<?php namespace Admin\Controller; 


class FanController extends Controller{

	
    //动作
    public function index(){
    	
		$count = Db::table('fan')->count();
		
		$page = Page::row(2)->make($count);
		
		$data = Db::table('fan')->limit(Page::limit())->get();
		View::with('page',$page);
		View::with('data',$data);
		
    	View::make();
    }
	
	public function getInfo()
	{

		$id = (int)$_POST['id'];

		$info = Db::table('fan')->where('id',$id)->first();

		View::ajax($info);
		
		
	}
	
	
	

	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
}
